<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="button" @click="doIt(666,'老铁')" :value="val">
        <input type="text" @keyup.enter="sayHi">

    </div>
    <script src="./lib/vue.js"></script>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                val: "点击我"

            },
            methods: {
                doIt: function (p1, p2) {
                    console.log("做It");
                    console.log(p1);
                    console.log(p2);
                },
                sayHi: function () {
                    alert("吃了吗")
                }
            },
        })
    </script>

</body>

</html>